<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script>
    // 1.参数问题
    // 1.1.放入两个参数
    const sum = (num1, num2) => {
      return num1 + num2
    }

    // 1.2.放入一个参数:小括号是可以省略的
    const power = num => {
      return num * num
    }

    // 2.函数中
    // 2.1函数代码块中,有多行代码时候
    const test = () => {
      // 打印
      console.log('hello');
      // 打印
      console.log('vue');
    }

    // 2.2.函数代码块只有一行代码
    const mul = (num1, num2) => num1 + num2
    console.log(mul(20, 30));

    const demo = () => console.log('demo');
    demo()
  </script>

</body>

</html>